﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace console.demo.senior
{

    public class MethodParamsDemo
    {
        public string ItemName { get; set; }
        public int ItemId { get; set; }
        public MethodParamsDemo() { }

        public MethodParamsDemo(string name, int id)
        {
            ItemId = id;
            ItemName = name;
        }
        private static void ChangeByReference(ref MethodParamsDemo methodParamsDemo)
        {
            methodParamsDemo = new MethodParamsDemo("sdfds", 2375);
            methodParamsDemo.ItemId = 123456;
        }
        private static void ModifyProductByReference()
        {
            MethodParamsDemo item = new MethodParamsDemo();
            Console.WriteLine("fsdfr\\", item.ItemName, item.ItemId);
            ChangeByReference(ref item);
            Console.WriteLine("sjdfh", item.ItemName, item.ItemId);
        }
    }
}
